package org.feifei.pet.domain;


import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.models.auth.In;
import lombok.*;
import lombok.experimental.Accessors;
import org.feifei.basic.domain.BaseDomain;
import org.feifei.org.domain.Shop;
import org.feifei.user.domain.User;

import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@Getter
@Setter
@EqualsAndHashCode
public class Pet extends BaseDomain {
    @ApiModelProperty("宠物名称")
    private String name;
    @ApiModelProperty("宠物展示图片")
    private String resources;
    @ApiModelProperty("售价")
    private BigDecimal saleprice;
    @ApiModelProperty("下架时间")
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Date offsaletime;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    @ApiModelProperty("上架时间")
    private Date onsaletime;
    @ApiModelProperty("状态 0下架 1上架")
    private Integer state = 0;
    @ApiModelProperty("成本价")
    private BigDecimal costprice;
    @ApiModelProperty("创建时间")
    private Date createtime = new Date();
    @ApiModelProperty("宠物类型")
    private Long type_id;
    @ApiModelProperty("宠物类型")
    private PetType type;
    @ApiModelProperty("店铺id")
    private Long shop_id;
    @ApiModelProperty("店铺")
    private Shop shop;
    @ApiModelProperty("领养人id")
    private Long user_id;
    @ApiModelProperty("领养人")
    private User user;
    @ApiModelProperty("领养id")
    private Long adopt_id;
    @ApiModelProperty("寻主消息id，如果没有就是店铺自己的商品")
    private Long search_master_msg_id;
    @ApiModelProperty("宠物细节")
    private PetDetail detail = new PetDetail();
    @ApiModelProperty("支付方式")
    private Integer payType;

}
